﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Compiler.TableOfSymbols.Types
{
    public abstract class ConstructedGenericType : GenericClassTypeValue
    {
        private GenericTypeDefinition definition;

        public GenericTypeDefinition Definition
        { 
            get { return definition; } 
        }

        public ConstructedGenericType(string name, GenericTypeDefinition definition) 
            : base(name) 
        {
            if (definition == null)
                throw new ArgumentNullException("definition can not be null");
            this.definition = definition;
        }

        public override bool IsGenericTypeDefinition
        {
            get { return false; }
        }

        public abstract bool IsGenericType 
        { 
            get; 
        }

        public abstract bool IsGenericVarType 
        { 
            get; 
        }
    }
}
